package yaty.lee.ssh2.service.impl;

import yaty.lee.ssh2.bean.Admin;
import yaty.lee.ssh2.dao.AdminDao;
import yaty.lee.ssh2.exception.ModelException;
import yaty.lee.ssh2.service.AdminService;
import yaty.lee.ssh2.util.PageList;

public class AdminServiceImpl implements AdminService {
	private AdminDao adminDao;

	@Override
	public PageList<Admin> list(Admin admin, int skip, int size)
			throws ModelException {
		return adminDao.list(admin, skip, size);
	}

	@Override
	public Admin saveAdmin(Admin admin) throws ModelException {
		return adminDao.saveAdmin(admin);
	}

	@Override
	public Admin load(int id) throws ModelException {
		return adminDao.load(id);
	}

	@Override
	public void modify(Admin admin) throws ModelException {
		adminDao.modify(admin);
	}

	public void setAdminDao(AdminDao adminDao) {
		this.adminDao = adminDao;
	}

}
